<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Calico: calico::WorldModel Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Calico
   </div>
   <div id="projectbrief">A visual-inertial calibration library designed for rapid problem construction and debugging.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecalico.html">calico</a></li><li class="navelem"><a class="el" href="classcalico_1_1WorldModel.html">WorldModel</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classcalico_1_1WorldModel-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">calico::WorldModel Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="world__model_8h_source.html">world_model.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:afd4a907cae652f141e5ec99fc3bc1fdc"><td class="memItemLeft" align="right" valign="top">absl::Status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#afd4a907cae652f141e5ec99fc3bc1fdc">AddLandmark</a> (<a class="el" href="structcalico_1_1Landmark.html">Landmark</a> *landmark, bool take_ownership=true)</td></tr>
<tr class="separator:afd4a907cae652f141e5ec99fc3bc1fdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91c0845b071a8e64a304943417e9d0ca"><td class="memItemLeft" align="right" valign="top">absl::Status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#a91c0845b071a8e64a304943417e9d0ca">AddRigidBody</a> (<a class="el" href="structcalico_1_1RigidBody.html">RigidBody</a> *rigidbody, bool take_ownership=true)</td></tr>
<tr class="separator:a91c0845b071a8e64a304943417e9d0ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf704782e9329ec635dd92e5eec5a628"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#acf704782e9329ec635dd92e5eec5a628">AddParametersToProblem</a> (ceres::Problem &amp;problem)</td></tr>
<tr class="separator:acf704782e9329ec635dd92e5eec5a628"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb53d0d6c62e00865f788e0bd1ca2f05"><td class="memItemLeft" align="right" valign="top"><a id="acb53d0d6c62e00865f788e0bd1ca2f05"></a>
const absl::flat_hash_map&lt; int, std::unique_ptr&lt; <a class="el" href="structcalico_1_1Landmark.html">Landmark</a> &gt; &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#acb53d0d6c62e00865f788e0bd1ca2f05">landmarks</a> () const</td></tr>
<tr class="memdesc:acb53d0d6c62e00865f788e0bd1ca2f05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for landmarks. <br /></td></tr>
<tr class="separator:acb53d0d6c62e00865f788e0bd1ca2f05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07c41aefd3750441c9e99470e5dc9ab5"><td class="memItemLeft" align="right" valign="top"><a id="a07c41aefd3750441c9e99470e5dc9ab5"></a>
absl::flat_hash_map&lt; int, std::unique_ptr&lt; <a class="el" href="structcalico_1_1Landmark.html">Landmark</a> &gt; &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>landmarks</b> ()</td></tr>
<tr class="separator:a07c41aefd3750441c9e99470e5dc9ab5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6075b5294ddcd0baea9ab78aa2cc1f2a"><td class="memItemLeft" align="right" valign="top"><a id="a6075b5294ddcd0baea9ab78aa2cc1f2a"></a>
const absl::flat_hash_map&lt; int, std::unique_ptr&lt; <a class="el" href="structcalico_1_1RigidBody.html">RigidBody</a> &gt; &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#a6075b5294ddcd0baea9ab78aa2cc1f2a">rigidbodies</a> () const</td></tr>
<tr class="memdesc:a6075b5294ddcd0baea9ab78aa2cc1f2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for rigid bodies. <br /></td></tr>
<tr class="separator:a6075b5294ddcd0baea9ab78aa2cc1f2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94de558c77896f19172ebcee9b6c0b12"><td class="memItemLeft" align="right" valign="top"><a id="a94de558c77896f19172ebcee9b6c0b12"></a>
absl::flat_hash_map&lt; int, std::unique_ptr&lt; <a class="el" href="structcalico_1_1RigidBody.html">RigidBody</a> &gt; &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>rigidbodies</b> ()</td></tr>
<tr class="separator:a94de558c77896f19172ebcee9b6c0b12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d74e3083470d9ce42e76c0c18232352"><td class="memItemLeft" align="right" valign="top"><a id="a0d74e3083470d9ce42e76c0c18232352"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#a0d74e3083470d9ce42e76c0c18232352">EnableGravityEstimation</a> (bool enable)</td></tr>
<tr class="memdesc:a0d74e3083470d9ce42e76c0c18232352"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable flag for gravity estimation. <br /></td></tr>
<tr class="separator:a0d74e3083470d9ce42e76c0c18232352"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bdb7b2cfbd251208ae991ccae15f9fc"><td class="memItemLeft" align="right" valign="top"><a id="a1bdb7b2cfbd251208ae991ccae15f9fc"></a>
const Eigen::Vector3d &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#a1bdb7b2cfbd251208ae991ccae15f9fc">gravity</a> () const</td></tr>
<tr class="memdesc:a1bdb7b2cfbd251208ae991ccae15f9fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for gravity vector. <br /></td></tr>
<tr class="separator:a1bdb7b2cfbd251208ae991ccae15f9fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dca41a9e501ec5b40fe0a93f9a698df"><td class="memItemLeft" align="right" valign="top"><a id="a1dca41a9e501ec5b40fe0a93f9a698df"></a>
Eigen::Vector3d &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>gravity</b> ()</td></tr>
<tr class="separator:a1dca41a9e501ec5b40fe0a93f9a698df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d95faa8fb56eeb96c27b1c3f3138886"><td class="memItemLeft" align="right" valign="top"><a id="a9d95faa8fb56eeb96c27b1c3f3138886"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#a9d95faa8fb56eeb96c27b1c3f3138886">SetGravity</a> (const Eigen::Vector3d &amp;<a class="el" href="classcalico_1_1WorldModel.html#a1bdb7b2cfbd251208ae991ccae15f9fc">gravity</a>)</td></tr>
<tr class="memdesc:a9d95faa8fb56eeb96c27b1c3f3138886"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setter for gravity for easy pybind integration. <br /></td></tr>
<tr class="separator:a9d95faa8fb56eeb96c27b1c3f3138886"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9caceb6a22a4761f7d5d15db6e6b134c"><td class="memItemLeft" align="right" valign="top"><a id="a9caceb6a22a4761f7d5d15db6e6b134c"></a>
const Eigen::Vector3d &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#a9caceb6a22a4761f7d5d15db6e6b134c">GetGravity</a> () const</td></tr>
<tr class="memdesc:a9caceb6a22a4761f7d5d15db6e6b134c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Getter for gravity for easy pybind integration. <br /></td></tr>
<tr class="separator:a9caceb6a22a4761f7d5d15db6e6b134c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5490368c97a76f340846c6fdf4bfc06"><td class="memItemLeft" align="right" valign="top"><a id="ae5490368c97a76f340846c6fdf4bfc06"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#ae5490368c97a76f340846c6fdf4bfc06">NumberOfLandmarks</a> () const</td></tr>
<tr class="memdesc:ae5490368c97a76f340846c6fdf4bfc06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of landmarks currently in this world model. <br /></td></tr>
<tr class="separator:ae5490368c97a76f340846c6fdf4bfc06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3814abe90cbbf75f7ac91bfaf4071506"><td class="memItemLeft" align="right" valign="top"><a id="a3814abe90cbbf75f7ac91bfaf4071506"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#a3814abe90cbbf75f7ac91bfaf4071506">NumberOfRigidBodies</a> () const</td></tr>
<tr class="memdesc:a3814abe90cbbf75f7ac91bfaf4071506"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of rigid bodies currently in this world model. <br /></td></tr>
<tr class="separator:a3814abe90cbbf75f7ac91bfaf4071506"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad118b23fe00fa57e84931de473f63fef"><td class="memItemLeft" align="right" valign="top"><a id="ad118b23fe00fa57e84931de473f63fef"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#ad118b23fe00fa57e84931de473f63fef">ClearLandmarks</a> ()</td></tr>
<tr class="memdesc:ad118b23fe00fa57e84931de473f63fef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all <code><a class="el" href="structcalico_1_1Landmark.html">Landmark</a></code> objects from the world model. <br /></td></tr>
<tr class="separator:ad118b23fe00fa57e84931de473f63fef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c0a27afdf03193c8de4fa2f0127e884"><td class="memItemLeft" align="right" valign="top"><a id="a1c0a27afdf03193c8de4fa2f0127e884"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#a1c0a27afdf03193c8de4fa2f0127e884">ClearRigidBodies</a> ()</td></tr>
<tr class="memdesc:a1c0a27afdf03193c8de4fa2f0127e884"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all <code><a class="el" href="structcalico_1_1RigidBody.html">RigidBody</a></code> objects from the world model. <br /></td></tr>
<tr class="separator:a1c0a27afdf03193c8de4fa2f0127e884"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc24a5177e78989c1f0b4dbf976f2c96"><td class="memItemLeft" align="right" valign="top"><a id="afc24a5177e78989c1f0b4dbf976f2c96"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#afc24a5177e78989c1f0b4dbf976f2c96">Clear</a> ()</td></tr>
<tr class="memdesc:afc24a5177e78989c1f0b4dbf976f2c96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all objects from the world model. <br /></td></tr>
<tr class="separator:afc24a5177e78989c1f0b4dbf976f2c96"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:ad1ea2db6d798cefe1a3324d928d8cf80"><td class="memItemLeft" align="right" valign="top">static constexpr double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1WorldModel.html#ad1ea2db6d798cefe1a3324d928d8cf80">kGravityDefaultZ</a> = -9.80665</td></tr>
<tr class="separator:ad1ea2db6d798cefe1a3324d928d8cf80"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><code><a class="el" href="classcalico_1_1WorldModel.html">WorldModel</a></code> manages all <code><a class="el" href="structcalico_1_1Landmark.html">Landmark</a></code> and <code><a class="el" href="structcalico_1_1RigidBody.html">RigidBody</a></code> objects in an optimization problem. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="afd4a907cae652f141e5ec99fc3bc1fdc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd4a907cae652f141e5ec99fc3bc1fdc">&#9670;&nbsp;</a></span>AddLandmark()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">absl::Status calico::WorldModel::AddLandmark </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcalico_1_1Landmark.html">Landmark</a> *&#160;</td>
          <td class="paramname"><em>landmark</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>take_ownership</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a <code><a class="el" href="structcalico_1_1Landmark.html">Landmark</a></code> object to the world model. Returns an InvalidArgument status code if the landmark id is not unique. </p>

</div>
</div>
<a id="acf704782e9329ec635dd92e5eec5a628"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf704782e9329ec635dd92e5eec5a628">&#9670;&nbsp;</a></span>AddParametersToProblem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int calico::WorldModel::AddParametersToProblem </td>
          <td>(</td>
          <td class="paramtype">ceres::Problem &amp;&#160;</td>
          <td class="paramname"><em>problem</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add internal parameters to a ceres problem. Any internal parameters set to constant are marked as such in the problem. Returns the total number of parameters added to the problem. </p>

</div>
</div>
<a id="a91c0845b071a8e64a304943417e9d0ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91c0845b071a8e64a304943417e9d0ca">&#9670;&nbsp;</a></span>AddRigidBody()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">absl::Status calico::WorldModel::AddRigidBody </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcalico_1_1RigidBody.html">RigidBody</a> *&#160;</td>
          <td class="paramname"><em>rigidbody</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>take_ownership</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a <code><a class="el" href="structcalico_1_1RigidBody.html">RigidBody</a></code> object to the world model. Returns an InvalidArgument status code if the rigid body id is not unique. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ad1ea2db6d798cefe1a3324d928d8cf80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1ea2db6d798cefe1a3324d928d8cf80">&#9670;&nbsp;</a></span>kGravityDefaultZ</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr double calico::WorldModel::kGravityDefaultZ = -9.80665</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Default magnitude of gravity vector. Gravity resolved in the standard inertial frame is defined as \(\mathbf{g}^w=\left[0, 0, -9.80665\right]^T\) </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>calico/<a class="el" href="world__model_8h_source.html">world_model.h</a></li>
<li>calico/world_model.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
